// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class Messages : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<Messages, MasterDbContextLocator>
    {

        public int MessageId { get; set; }
        public string UserCode { get; set; }
        public string Title { get; set; }
        public string Message { get; set; }
        public string SendPerson { get; set; }
        public int? Type { get; set; }
        public bool? IsRead { get; set; }
        public DateTime? SendTime { get; set; }
        public string Remak { get; set; }
        public string ViewType { get; set; }
        public int? SendResultCode { get; set; }
        public string SendResultMsg { get; set; }
    
        public void Configure(EntityTypeBuilder<Messages> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasKey(e => e.MessageId)
                    .HasName("PK__Messages__C87C0C9C6C8FDA89");

                entityBuilder.Property(e => e.Message).IsUnicode(false);

                entityBuilder.Property(e => e.Remak)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.SendPerson)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.SendResultMsg).HasMaxLength(4000);

                entityBuilder.Property(e => e.SendTime)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())");

                entityBuilder.Property(e => e.Title)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.UserCode)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entityBuilder.Property(e => e.ViewType).HasMaxLength(50);
        }

    }
}

